const mongoose = require("mongoose")

const schema = new mongoose.Schema({
    username:{type: String},
    id_card:{type:String},
    phone:{type:String},
    sex:{type:String},
    password:{type: String,set(val){
        return require('bcrypt').hashSync(val,10)
    },
    select:false,
    
  },
})

module.exports = mongoose.model('CustomUser',schema)